#include<cstdio>
int main(){
  freopen("clown.in","r",stdin);
  freopen("clown.out","w",stdout);
  int m;scanf("%d",&m);
  int n=1;
  for(int i=1;i<=m;++i){
    int x;scanf("%d",&x);
    n*=x;
  }
  int a,b;scanf("%d%d",&a,&b);
  if(n==3)puts("24");
}